﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WmsApp.WmsService;

namespace WmsApp.Service
{
    public class OutStoreBillService : IEntityService<OutStoreBill, OutStoreBillService>
    {

        #region IEntityService<InStoreBill> Members

        public List<OutStoreBill> GetEntityList()
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<OutStoreBill> list = sc.GetOutStoreBills();
            foreach (var outStoreBill in list)
            {
                outStoreBill.BindPropertyChanged();
            }
            return list;
        }

        public List<OutStoreBill> GetEntityList(string condition)
        {
            var sc = Factory.WmsServiceFactory.GetServiceClient();
            List<OutStoreBill> list = sc.GetOutStoreBillsByCondition(condition);
            foreach (var outStoreBill in list)
            {
                outStoreBill.BindPropertyChanged();
            }
            return list;
        }

        public void SaveEntityList(List<OutStoreBill> list)
        {
            throw new NotImplementedException();
        }

        public OutStoreBill GetEntity(string key)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
